package core

import (
	"base-web/global"
	"github.com/lexkong/log"
)

//日志配初始化
func init() {
	logConf := global.BASE_CONFIG.Log
	passLagerCfg := log.PassLagerCfg{
		Writers:        logConf.Writers,
		LoggerLevel:    logConf.LoggerLevel,
		LoggerFile:     logConf.LoggerFile,
		LogFormatText:  logConf.LogFormatText,
		RollingPolicy:  logConf.RollingPolicy,
		LogRotateDate:  logConf.LogRotateDate,
		LogRotateSize:  logConf.LogRotateSize,
		LogBackupCount: logConf.LogBackupCount,
	}
	log.InitWithConfig(&passLagerCfg)
}
